package com.woniuxy.main.mapper;

import org.apache.ibatis.annotations.Select;

public interface Index_adminMapper {
	
	//查询男学员数
	@Select("select COUNT(*) from student where ssex='男'")
	public int countMaleStudent();
	
	//查询女学员数
	@Select("select COUNT(*) from student where ssex='女'")
	public int countFemaleStudent();
	
	//查询男教练数
	@Select("select COUNT(*) from coach where csex='男'")
	public int countMaleCoach();
	
	//查询女教练数
	@Select("select COUNT(*) from coach where csex='女'")
	public int countFemaleCoach();
	
	//查询交易达成数
	@Select("select COUNT(*) from `order` where status=1")
	public int countFinishOrder();
	
	//查询场馆总数
	@Select("select COUNT(*) from gym")
	public int countGym();
	
	//查询认证教练数
	@Select("select COUNT(*) from coach where authentication=1")
	public int countAuthenticCoach();
	
	//查询签约总数
	@Select("select COUNT(*) from `order`")
	public int countOrder();
	
	//查询未处理学员申诉数
	@Select("select COUNT(*) from vi_user_complain where userRole='student' and isSuccess=0")
	public int countUnreadStudentCom();
	
	//查询未处理教练申诉数
	@Select("select COUNT(*) from vi_user_complain where userRole='coach' and isSuccess=0")
	public int countUnreadCoachCom();
	
	//查询未处理场馆申诉数
	@Select("select COUNT(*) from vi_user_complain where userRole='gym' and isSuccess=0")
	public int countUnreadGymCom();

}
